package com.jefe.bamboo;

import java.io.Serializable;
/**
 *
 * @author Sonali Mendis
 * Bamboo Portlet for Jefe (http://www.jefesolutions.com)
 * GNU License
 */
public class BambooProject {
    private String projectName;
    private String projectURL;
    private String lastBuildImage;
    private String lastBuildStatus;

    public BambooProject(){

    }

    public String getLastBuildImage() {
        return lastBuildImage;
    }

    public void setLastBuildImage(String lastBuildImage) {
        this.lastBuildImage = lastBuildImage;
    }

    public String getLastBuildStatus() {
        return lastBuildStatus;
    }

    public void setLastBuildStatus(String lastBuildStatus) {
        
        if(lastBuildStatus.equals("Failed")){
            setLastBuildImage("red.gif");
            this.lastBuildStatus = "FAILED";

        }else if(lastBuildStatus.equals("Successful")){
            setLastBuildImage("blue.gif");
            this.lastBuildStatus = "SUCCESS";
        }else{
            setLastBuildImage("grey.gif");
            this.lastBuildStatus = "UNKNOWN";
        }
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getProjectURL() {
        return projectURL;
    }

    public void setProjectURL(String projectURL) {
        this.projectURL = projectURL;
    }

}
